<!--{template header}-->
<!--{eval $adlist = $this->fromcache("adlist");}-->
<script type="text/javascript" src="{SITE_URL}js/editor/ueditor.config.js"></script> 
<script type="text/javascript" src="{SITE_URL}js/editor/ueditor.all.js"></script> 
<div class="nav-line">
    <a class="first" href="{SITE_URL}">{$setting['site_name']}</a>
    &gt; <a href="{url note/list}">公告列表</a> &gt; <span>查看公告</span>
</div>
<div class="wrapper clearfix">
    <div class="content-left">
        <div class="notebox">
            <div class="title">
                <h1>{$note['title']} </h1>
            </div>
            <div class="time">
                <span>作者 : {$note['author']}</span>
                <span class="span-line">|</span>
                <span>发布时间 : {$note['format_time']}</span>
                <span class="span-line">|</span>
                <span>浏览{$note['views']}次</span>
            </div>
            <div class="description">{$note['content']}</div> 
        </div>
        <div class="share-content">{$setting['question_share']}</div>
        <div class="your-answer-mod clearfix">
            <div class="title">我要评论</div>
            <form name="commentForm" action="{url note/addcomment}" method="post">
                <input type="hidden" value="{$note['id']}" name="noteid">
                <div class="your-answer">
                    <script type="text/plain" id="content" name="content" style="height: 122px;"></script>
                    <script type="text/javascript">UE.getEditor('content', UE.utils.extend({toolbars:[[{$toolbars}]]}));</script>
                </div>
                <div class="input-bar">
                    <h2>验证码</h2>
                    <input type="text" onblur="check_code()" name="code" id="code" class="code-input">&nbsp;<span class="verifycode"><img id="verifycode" onclick="javascript:updatecode();" src="{url user/code}"></span><a class="changecode" href="javascript:updatecode();">&nbsp;换一个</a>
                    <span id="codetip"></span>
                    <input type="submit" name="submit" class="normal-button flright" class='float:right' value="提&nbsp;交">
                </div>
            </form>
        </div>
        <!--广告位1-->
        <!--{if (isset($adlist['common']['left1']) && trim($adlist['common']['left1']))}-->
        <div style="margin-top:5px;">{$adlist['common']['left1']}</div>
        <!--{/if}-->
        <!--{if $commentlist}-->
        <div  class="net-answer mt10">
            <div class="title">全部评论</div>
            <ul class="net-answer-list">
                <!--{loop $commentlist $index $comment}-->
                <li>
                    <div class="mainBox">
                        <div class="avatar">
                            <div  class="avarta-img">
                                <div class="avarta-name"><a target="_blank" href="{url user/space/$comment['authorid']}"><img width="50" height="50" alt="{$comment['author']}" src="{$comment['avatar']}" onmouseover="pop_user_on(this, '{$comment[authorid]}', 'img');"  onmouseout="pop_user_out();"></a></div>
                            </div>
                            <div class="avarta-name"><a target="_blank" title="{$comment['author']}" href="{url user/space/$comment['authorid']}" onmouseover="pop_user_on(this, '{$comment[authorid]}', 'text');"  onmouseout="pop_user_out();">{$comment['author']}</a></div>                           
                        </div>
                        <div class="anscontent">{$comment['content']}</div>
                    </div>
                    <div class="clr"></div>
                    <div class="comment-box mt10">
                        <div class="comments-hd">
                            <span class="time">评论于 {$comment['format_time']}</span>
                            <!--{if  ($user['grouptype']==1)}-->
                            <span class="admin"><a href="javascript:void(0);" onclick="delete_comment('{$note['id']}', '{$comment['id']}')">删除</a></span>
                            <!--{/if}-->
                        </div>
                    </div>
                </li>
                <!--{/loop}-->
            </ul>
        </div>
        <!--{/if}-->
        <div class="pages">{$departstr}</div>
    </div>

    <div class="aside-right">
        <div class="modbox hot-problem">
            <!-- 热门问题 -->
            <div class="title">最新公告</div>
            <ul class="list">
                <!--{eval $notelist=$this->fromcache('notelist');}-->
                <!--{loop $notelist $note}-->
                <li><a target="_blank" title="{$note['title']}" {if $note['url']}href="{$note['url']}"{else}href="{url note/view/$note['id']}"{/if}>{eval echo cutstr({$note['title']},28);}</a></li>
                <!--{/loop}-->
            </ul>
        </div>
        <!--广告位2-->
        <!--{if (isset($adlist['common']['right1']) && trim($adlist['common']['right1']))}-->
        <div style="margin-top:5px;">{$adlist['common']['right1']}</div>
        <!--{/if}-->
    </div>
</div>
<link rel="stylesheet" href="{SITE_URL}js/lightbox/lightbox.css"/>
<script type="text/javascript" src="{SITE_URL}js/lightbox/lightbox.js"></script>
<script type="text/javascript">
                                        $(document).ready(function(){
                                $(".anscontent img,.description img").each(function(i){
                                var img = $(this);
                                        $.ajax({
                                        type: "POST",
                                                url: "{url index/ajaxchkimg}",
                                                async: true,
                                                data: "imgsrc=" + img.attr("src"),
                                                success: function(status){
                                                if ('1' == status){
                                                img.wrap("<a href='" + img.attr("src") + "' title='" + img.attr("title") + "' data-lightbox='comment'></a>");
                                                }
                                                }
                                        });
                                });
                                });
                                        function delete_comment(noteid, commentid) {
                                        if (confirm('确定删除改评论？') === true) {
                                        document.location.href = g_site_url + '' + query + 'note/deletecomment/' + noteid + '/' + commentid + g_suffix;
                                        }
                                        }
</script>
<!--{template footer}-->